package com.clientmanage.controller;

import com.clientmanage.domain.vo.clientInfoVo;
import com.clientmanage.service.ICustomerService;
import com.clientmanage.domain.resp.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 客户升级控制器
 * 实现客户升级为会员相关接口
 */
@RestController
@RequestMapping("/customer")
public class CustomerUpgradeController {

    @Autowired
    private ICustomerService customerService;

    /**
     * 升级为会员
     * 接口地址：POST /customer/upgrade
     */
    @PostMapping("/upgrade")
    public Result<Void> upgradeToMember(@RequestBody clientInfoVo vo) {
        customerService.upgradeToMember(vo.getCustomerId(), vo.getMemberLevel());
        return Result.success();
    }
} 